home *** CD-ROM | disk | FTP | other *** search
- // Displays multiple windows
-
- #include <conio.h>
- #include "tfsounit.h"
- #include "keybrd.h"
-
- main()
- {
- clrscr();
- Tfso T1(0x31, Swappable+Closeable, RedColors);
- T1.SetSize(40, 15);
- T1.SetLocn(5, 5);
- T1.GetImage(T1.Overall); // Save the image behind the window
- T1.DrawFrame(0,0); // Draw the window
- T1.Clear(177, 0);
- bioskey(0);
- Tfso T2(0x21, Swappable+Closeable, CyanColors);
- T2.SetSize(30, 10);
- T2.SetLocn(47, 10);
- T2.GetImage(T2.Overall); // Save the image behind window 2
- T2.DrawFrame(0,0);
- T2.Clear(177, 0);
-
- T1.HzWrt(0, 1, "Window 1", 0); // Display message in window 1
- bioskey(0);
- T2.HzWrt(0, 1, "Window 2", 0); // Display message in window 2
- bioskey(0);
- T1.Swap(T1.Overall, PutIm); // Hide window 1
- bioskey(0);
- T2.Swap(T2.Overall, PutIm); // Hide window 2
- T1.SetLocn(30, 6); // Move window 1 and re-display
- T1.Swap(T1.Overall, GetIm);
- bioskey(0);
- T2.Swap(T2.Overall, GetIm); // Put window 2 on top
- bioskey(0);
- }
-